package com.dong.mcd.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dong.mcd.dao.ReportDimensionMapper;
import com.dong.mcd.model.ReportDimension;
import com.dong.mcd.service.IReportService;

@Transactional
@Service("reportService")
public class ReportServiceImpl implements IReportService {

	@Autowired
	private ReportDimensionMapper dimMapper;
	
	public List<ReportDimension> querAllDims() {
		return dimMapper.select(null);
	}

	public void addDim(ReportDimension dim) {
		dimMapper.insert(dim);
	}

	public void updateDim(ReportDimension dim) {
		dimMapper.updateByPrimaryKey(dim);
	}

	public ReportDimension getDimByKey(Integer key) {
		return dimMapper.selectByPrimaryKey(key);
	}
	
}
